package com.langwen.login.service.impl;

import java.util.List;

import javax.xml.registry.infomodel.User;

import com.langwen.Model.HrEmp;
import com.langwen.login.dao.UserDao;
import com.langwen.login.service.UserService;


public class UserServiceImpl implements UserService {

	private UserDao userDao;
	
	public void add(HrEmp emp) {
		userDao.add(emp);
	}

	public void delete(HrEmp emp) {
		userDao.deleteById(emp.getENo());
	}

	public void deleteById(int id) {
		userDao.deleteById(id);
	}

	public HrEmp getByUsername(String username) {
		return userDao.getByUsername(username);
	}
	
	public HrEmp getById(int id) {
		return userDao.getById(id);
	}

	public List<HrEmp> getUsers() {
		return userDao.getUsers();
	}
	public void update(HrEmp emp) {
		userDao.update(emp);
	}
	
	public void setUserDao(UserDao userDao) {
		this.userDao = userDao;
	}

}
